package week07_tch;

import java.util.Random;

public class PlaneAirPort implements AirPort {
   private  Plane plane;
   public PlaneAirPort(Plane plane){
       this.plane=plane;
   }
    @Override
    public void schedule() {
        Random rdm =new Random();
        if (rdm.nextBoolean()){
            System.out.println("机场允许起飞");
            plane.takeoff();
        }
        else{
            System.out.println("机场不允许起飞");
        }
    }
}
